@text : #D4D4D4;
@border       : #ccc;
@text_lighter : #fff;
@text_light   : #e7e7e7;
@sans_serif   : 'Segoe UI',
'Helvetica Neue';
@monospace : 'Consolas',
'Menlo';

@tab_font_size: 14px;
@ui_font_size : 14px;

@background_primary : #1E1E1E;
@background_menu    : #252526;
@background_color_4 : #3C3C3C;
@background_color_5 : #333;
@background_color_6 : #505050;
@background_color_7 : #2D3234;
@background_color_9 : #2D2D2D;
@background_color_11: rgba(121, 121, 121, 0.4);
@background_color_12: rgba(100, 100, 100, 0.7);
@background_color_13: #094771;

.disasm-font {
    font-family: "<DISASSEMBLY_FONT_FAMILY>";
    font-size  : <DISASSEMBLY_FONT_SIZE>;
    font-style : <DISASSEMBLY_FONT_STYLE>;
    font-weight: <DISASSEMBLY_FONT_WEIGHT>;
}

.hexview-font {
    font-family: "<HEXVIEW_FONT_FAMILY>";
    font-size  : <HEXVIEW_FONT_SIZE>;
    font-style : <HEXVIEW_FONT_STYLE>;
    font-weight: <HEXVIEW_FONT_WEIGHT>;
}

.text-input-font {
    font-family: "<TEXT_INPUT_FONT_FAMILY>";
    font-size  : <TEXT_INPUT_FONT_SIZE>;
    font-style : <TEXT_INPUT_FONT_STYLE>;
    font-weight: <TEXT_INPUT_FONT_WEIGHT>;
}

/* Common properties */
QWidget {
    background-color: @background_primary;
    color           : @text;
}

IDAView {
    border       : none;
    border-bottom: 1px solid #414141;
    .disasm-font;
}

hexview_t {
    border: none;
    .hexview-font;
}

CustomIDAMemo {
    border: none;
    .text-input-font;
}

QToolBar {
    /* Toolbar */
    background-color: @background_color_5;
    border          : none;
    padding         : 8px;
    spacing         : 8px;

    &:active {
        background-color: @background_color_4;
    }

    QWidget {
        background: transparent;
    }

    &:handle:horizontal {
        image        : url(<SKINDIR>/icons/drag.png);
        padding-right: 10px;
        padding-left : 0;
        width        : 10px;
    }

    &:handle:vertical {
        image         : url(<SKINDIR>/icons/drag-vertical.png);
        padding-bottom: 10px;
        padding-left  : 0;
        height        : 10px;
    }
}

IDAMainWindow {
    >QStatusBar {
        &:item {
            border: none;
        }

        QWidget {
            font-family : @monospace;
            color       : @text_lighter;
            padding-left: 17px;
        }

        min-height  : 0;
        height      : 27px;
        padding-left: 7px;
        background  : #007acc;
    }
}

QPushButton {
    /* Buttons */
    font-family: @sans_serif;
    text-align : center;
    min-height : 20px;
    min-width  : 50px;
    border     : none;
    background : #0e639c;
    padding    : 2px 14px;

    &:hover {
        background: #17b;
        border    : 1px solid #2D3234;
    }

    &:default {
        border: 1px solid #2D3234;
    }

    &:pressed {
        border: 1px solid #215D9C;
    }
}

QTreeView {
    font-family: @sans_serif;
    border     : 1px solid #1B1F20;

    &:item {
        font-family: @sans_serif;
        font-size  : @ui_font_size;
        height     : 27.5px;

        &:selected {
            background-color: @background_color_13;
        }
    }
}

QLineEdit {
    /* Single line edit */
    font-family: @sans_serif;
    border     : 1px solid transparent;
    background : #272727;
    color      : @border;
    padding    : 4px;

    &:focus {
        border: 1px solid #135785;
    }
}

/* Dock widget without tabs */
QTabBar {
    font-family     : @sans_serif;
    background-color: @background_menu;

    &:tab {
        border-right    : 1px solid #252526;
        background-color: @background_color_9;
        height          : 43px;
        text-transform  : uppercase;
        font-size       : @tab_font_size;
        padding-left    : 16px;
        padding-right   : 16px;

        &:selected {
            background-color: @background_primary;
        }
    }

    &:close-button {
        &:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        &:pressed {
            icon-size: 24px;
            padding  : 1px -1px -1px 1px;
        }

        /* For toolbar */
        image    : url(<SKINDIR>/icons/close.png);
        icon-size: 20px;
        padding  : 0px;
    }
}

QMenuBar {
    /* Menu bar & items */
    font-family     : @sans_serif;
    background-color: @background_color_5;
    padding-left    : 2px;

    &:active {
        background-color: @background_color_4;
    }

    &:item {
        background: transparent;
        color     : @border;
        padding   : 8px 9px;

        &:selected {
            background-color: @background_color_6;
        }
    }
}

QTableView {
    /* Table and headers */
    font-family     : @sans_serif;
    border          : 1px solid #1B1F20;
    background-color: @background_menu;

    &:item {
        font-family: @sans_serif;
        font-size  : @ui_font_size;
        height     : 27.5px;

        &:selected {
            border          : none !important;
            background-color: @background_color_13;
        }
    }

    &:section {
        &:item {
            background: #1e1e1e !important;
        }
    }

    QHeaderView {
        &:section {
            background-color: @background_color_9;
            border          : none;

            &:horizontal {
                padding    : 5px;
                border-left: 1px solid #2D3234;
            }

            &:vertical {
                padding   : 0;
                background: transparent;
            }
        }
    }

    QTableCornerButton {
        &:section {
            background: #2D3234;
            border    : 0px outset #000;
        }
    }
}

QListView {
    &:item {
        font-family: @sans_serif;
        font-size  : @ui_font_size;
        height     : 27.5px;

        &:selected {
            background-color: @background_color_13;
        }
    }

    border: 1px solid #1B1F20;
}

QCheckBox {
    background-color: @text;
}

QCheckBox,
QLabel,
QRadioButton {
    background: transparent;
}

QMenu {
    background-color: @background_menu;
    padding-bottom  : 8px;

    &:item {
        font-weight: 400;
        padding    : 6px 40px 3px 40px;

        &:selected {
            background-color: @background_color_13;
        }
    }

    &:right-arrow {
        image : url(<SKINDIR>/icons/menu.png);
        margin: 5px 15px 5px 5px;
    }

    &:icon {
        padding-left: 20px;
    }

    &:separator {
        height    : 1px;
        background: #616162;
        width     : 1px;
        margin    : 6px;
    }
}

QComboBox {
    /* Combobox which is editable or not editable */
    background: #3c3c3c;
    border    : 1px solid #1B1F20;
    padding   : 4px;

    &:focus,
    &:on {
        border: 1px solid #135785;
        border: 1px solid transparent;
    }

    &:editable {
        border: 1px solid transparent;
    }

    QLineEdit {
        background: transparent;
        border    : 0;
        padding   : 0;
    }

    &:drop-down {
        subcontrol-origin  : padding;
        subcontrol-position: top right;
        border             : none;
        width              : 20px;

        &:editable {
            subcontrol-origin  : padding;
            subcontrol-position: top right;
            border             : none;
            width              : 20px;
        }
    }

    &:down-arrow {
        image : url(<SKINDIR>/icons/expand.png);
        margin: 0;
    }

    >QLineEdit {
        border    : none;
        min-height: default;

        &:hover {
            border    : none;
            min-height: default;
        }

        &:focus {
            border    : none;
            min-height: default;
        }
    }

    QAbstractItemView {
        background                : rgb(60, 60, 60);
        outline                   : none;
        selection-background-color: rgb(6, 47, 74);
    }

    &:focus {
        border: 1px solid #215D9C;
    }

    QLineEdit {
        &:focus {
            border-right: none;
        }
    }
}

QTextEdit {
    /* Multiple line edit */
    background-color: @background_color_7;
    border          : 1px solid #1B1F20;
}

TNavBand>QPushButton,
nav_scroll_button_t {
    border       : none;
    background   : transparent;
    min-height   : default;
    min-width    : default;
    padding      : default;
    border-radius: default;
}

RegJumpButton {
    min-height: 0;
    min-width : 0;
    border    : none;
    padding   : 0;
}

/* Dock widget which has tabs */
DockWidgetTitle {
    font          : @ui_font_size @sans_serif;
    background    : #252526;
    text-transform: uppercase;
    min-height    : 0px;
    height        : 43px;
    padding       : 0px 5px 0px 5px;
    border        : none;

    DockWidgetTitleButton {
        &:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        color     : @text_lighter;
        background: transparent;
        border    : none;
        min-height: 0;
        min-width : 0;
        margin    : 0;
        padding   : 0;

        &[toolTip="Close"] {
            qproperty-icon: url(<SKINDIR>/icons/close.png);
            icon-size     : 20px;
        }

        &[toolTip="Fullscreen"] {
            qproperty-icon: url(<SKINDIR>/icons/fullscreen.png);
            icon-size     : 20px;
        }

        &[toolTip="Float"] {
            qproperty-icon: url(<SKINDIR>/icons/float.png);
            icon-size     : 20px;
        }

    }

}

EditContainer {
    border: 1px solid #1B1F20;
    .text-input-font;
}

QScrollBar {
    /* Scrollbar */
    background-color: @background_primary;
    border          : 0px solid #383838;
    margin          : 0;
    padding         : 0;

    &:horizontal {
        border-top-width: 1px;
        height          : 12px;
    }

    &:vertical {
        border-left-width: 1px;
        width            : 12px;
    }

    &:sub-line {
        width : 0;
        height: 0;
    }

    &:add-line {
        width : 0;
        height: 0;
    }

    &:add-page {
        background: none;
        width     : 0;
        height    : 0;
    }

    &:sub-page {
        background: none;
        width     : 0;
        height    : 0;
    }

    &:handle {
        &:vertical {
            min-height: 20px;
        }

        &:horizontal {
            min-width: 20px;
        }

        background-color: @background_color_11;

        &:hover {
            background-color: @background_color_12;
        }
    }
}

ChooserContainer {
    border: 1px solid #1B1F20;
}

QGroupBox {
    border    : 1px solid #1B1F20;
    margin-top: 5px;

    &:title {
        subcontrol-origin  : margin;
        subcontrol-position: top center;
    }
}

TextArrows {
    border-bottom: 1px solid #414141;
}

IDADockWidget[objectName="Output window"] {
    /* Output window */
    qproperty-windowIcon: url(<SKINDIR>/icons/blank.png);

    DockWidgetTitle {
        background: #1e1e1e;
        color     : @text_light;
        margin    : 0;
    }

    QTextEdit {
        &:focus {
            border: 1px solid #215D9C;
        }
    }

    QLineEdit {
        padding-bottom: 2px;
    }

    QGroupBox {
        QPushButton {
            border        : none;
            text-transform: uppercase;
            min-width     : 70px;

            &:hover {
                border: none;
            }

            &:focus {
                border: none;
            }
        }

        margin  : 0;
        padding : 0;
        border  : none;
    }

}